<?php
$OrgObj =  ClassRegistry::init('Organisation');
$org = $OrgObj->find('first');
$org = $org['Organisation'];

if($paymentData){
?>
<style type="text/css">
    .print_container {
        margin-bottom: 20px;
        clear: both;
        font-size: 12px; 
        font-family: Verdana,Arial,sans-serif;
        padding: 10px;
        position: relative;
        margin-left: auto;
        margin-right: auto;
        width: 800px;
       /* border: 1px solid #B2B2B2; */
    }
    .print_container .header{
        position: relative;
        width: 200px;
        left: 50%;
        margin-left: -100px;  /***  width / 2   ***/
        margin-bottom: 50px;
    }
    .print_container .top{
        position: relative;
        width: 200px;
        left: 50%;
        margin-left: -100px;  /***  width / 2   ***/
        margin-bottom: 20px;
    }
    .print_container .content{
        position: relative;
        width: 600px;
        left: 50%;
        margin-left: -300px;  /***  width / 2   ***/
        margin-bottom: 50px;
    }
    
    .print_container .content table div{
        border-bottom: 1px solid #b0b0b0;
    }
    
    .cell_header {
    	background-color: #EEEEFF;
    	font-weight:bold;
    	text-align:left;
    	padding-left:5px;
    }   /* header cell in data table in tools */
    .data_table {
    	border-collapse: collapse;
    	width: 100%;
    	padding: 5px;
    }
    .data_table th {
    	padding-right: 12px;
    	border: 1px solid gray;
    	background-color: #E5EDF9;
    }
    .data_table tr.row_odd {
    	background-color: #F2F2F2;
    }
    .data_table tr.row_odd:hover, .data_table tr.row_even:hover {
    	background-color: #E5EDF9;
    }
    .data_table tr.row_even {
    	background-color: #fff;
    }
    .data_table td {
    	padding: 5px;
    	vertical-align: top;
    	border-bottom: 1px solid #b0b0b0;
    	border-right: 1px dotted #e1e1e1;
    	border-left: 1px dotted #e1e1e1;
    }
    
    table{
        font-size: 12px;
        font-family: Verdana,Arial,sans-serif;
        width: 100%;    
    }
    
    a{
        text-decoration: none;
    }
</style>
 <div id="print_cmd" style="font-size: 12px; font-family: Verdana,Arial,sans-serif; margin-bottom: 20px;">
    <?php
	   $img = $this->Html->image('icon-16.png', array('alt'=>'Print','width' => '26', 'height' => '26', 'border' => '0'));
       echo $this->Html->link($img."&nbsp; Print", 'javascript: void(0); window.print();',array('class'=>'','title'=>'Print','style'=>'','escape'=>false));
    ?>
 </div>
    <div class="print_container">
         <div class="header">
                <div class="name"><?php echo $org['name'] ;?></div>
                <div class="tel"><?php echo $org['telephone_1'].' &nbsp; '.$org['telephone_2'] ;?></div>
                <div class="box_address"><?php echo $org['postal_box'] ;?></div>
                <div class="logo">
                    <?php echo $this->Html->image($org['logo_path'], array('width' => '100', 'height' => '100', 'border' => '0')); ?>
                </div>
         </div>
         <div class="top">
                <div> <b><u> INVOICE </u></b></div>
         </div>
         <div class="content">
                <table border="0" cellpadding="5" cellspacing="5" class="">
                    <tr>
                        <td width="30%"><div>RECEIPT No.: &nbsp;<?php echo $paymentData['BillPayment']['receipt_no'] ;?></div></td>
                        <td>&nbsp;</td>
                        <td width="30%"><div>DATE:&nbsp;<?php echo $paymentData['BillPayment']['date'] ;?>  </div></td>
                    </tr>
                    <tr>
                        <td colspan="3"><div>FROM:&nbsp;<?php echo $paymentData['BillPayment']['recieved_from'] ;?> </div></td>
                    </tr>
                    <tr>
                        <td colspan="3"><div>SUM OF: </div></td>
                    </tr>
                    <tr>
                        <td colspan="3"><div></div></td>
                    </tr>
                    <tr>
                        <td colspan="3"><div>ON ACCOUNT: </div></td>
                    </tr>
                    <tr>
                        <td width="30%"><div>TYPE:&nbsp;<?php echo $paymentData['BillPayment']['type'] ;?></div></td>
                        <td></td>
                        <td width="30%"><div>BALANCE:&nbsp;<?php echo CURRENCY.'&nbsp;'.number_format($debit,2) ;?></div></td>
                    </tr>
                    <tr>
                        <td width="30%"><div><?php echo CURRENCY.'&nbsp;'.$paymentData['BillPayment']['amount'] ;?></div></td>
                        <td></td>
                        <td width="30%"><div>SIGNED:</div></td>
                    </tr>
                </table>
         </div>
         <div class="footer">
        
         </div>
    </div>
<?php    
}
else{
    echo "No Data At the Moment.";
}

?>